package com.hfy.pcberpbackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hfy.pcberpbackend.entity.QuoteItem;
import com.hfy.pcberpbackend.dto.QuoteItemVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 报价单物料明细Mapper接口
 */
@Mapper
public interface QuoteItemMapper extends BaseMapper<QuoteItem> {
    
    /**
     * 根据报价单ID查询物料明细列表
     */
    List<QuoteItemVO> selectByQuoteId(@Param("quoteId") Long quoteId);
    
    /**
     * 批量插入物料明细
     */
    int batchInsert(@Param("items") List<QuoteItem> items);
    
    /**
     * 根据报价单ID删除所有物料明细
     */
    int deleteByQuoteId(@Param("quoteId") Long quoteId);
} 